package com.overrided;
/*
 * 可变参数：
 */
public class Variable {

	public static void main(String[] args) {
		int array[] = { 1, 2, 3, 4, 5 };
//		int s = add(array);
		
	}

	private static int add(int... arg) {
		int sum = 0;
		for (int i : arg) {
			sum += i;
		}
		return sum;
	}
	

}
